// PerformanceTestingDlg.h : header file
//

#include "PerformanceControl.h"

#pragma once


#define TIMER_EVT_DELAYSTART 1
#define TIMER_EVT_AUTOREBOOT 2


// CPerformanceTestingDlg dialog
class CPerformanceTestingDlg : public CDialog
{
// Construction
public:
	CPerformanceTestingDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_PERFORMANCETESTING_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

public:
	static void _OnMessageCallback(LPCSTR msg);
	void PushMessage(LPCSTR msg);
	void SetCommandLine(LPWSTR cmd);
	void DoCommand();
	void Reboot();

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg void OnClose();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedStart();

//Data member
private:
	CPerformanceControl* m_perfCtrl;
	string m_msg;

	INT m_executeCount;

	std::wstring m_outputFilePrefix;
	FILE* m_outputFile;

	INT m_delayStartTime;
	BOOL m_isAutoStart;
	BOOL m_isAutoReboot;
	INT m_delayRebootTime;
	UINT m_timerDelayStart;
	UINT m_timerDelayReboot;

public:
	afx_msg void OnBnClickedStop();
	afx_msg void OnBnClickedClearedit();
	afx_msg void OnTimer(UINT nIDEvent);
};
